#include<stdio.h>

int main()
{
	int n,i,j;
	int a[25][25];
	scanf("%d",&n);
	if (n>20||n<=0)
		printf("Input Error\n");
	else
	{
		for (i=1;i<=n;i++)
		{
			a[i][i]=1;
			a[i][1]=1;
		}
		for (i=3;i<=n;i++)
			for (j=2;j<=i-1;j++)
				a[i][j]=a[i-1][j-1]+a[i-1][j];
		for (i=1;i<=n;i++)
		{
			for (j=1;j<=i;j++)
				printf("%d,",a[i][j]);
			printf("\n");
		}
	}
	return 0;
}
